<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link  href="../css/Page.css"  rel="stylesheet" />
	</head>
	<style>
		*{
	font-family:PingFang-SC-Bold;
}

.mui-bar-nav{
	background: #FFFFFF;
}

.xqsou{
	width: 90%;
	position: relative;
	float: left;
	height: 100%;
	padding-top: 3px;
}
.xqsou >input{
	width: calc(100% -  35px);
	height: 38px;
	position: relative;
	float: left;
	font-size:14px;
font-weight:bold;
color:rgba(152,152,152,1);
background:rgba(245,245,245,1);
border-radius:19px;
border: none;
padding-left: 44px;
box-sizing: border-box;
}

.xqsou >div{
	position: relative;
	float: right;
	width: 28px;
	height: 38px;
	line-height: 38px;
	font-size:14px;
font-weight:bold;
color:rgba(51,51,51,1);
}

.sous{
	position: absolute;
	width: 18px;
	height: 18x;
	left: 11px;
	top: 14px;
}
a{
	color:rgba(51,51,51,1)!important
}

.mui-content{
	width: 100%;
   position: relative;
	background: #FFFFFF;
	padding: 15px  15px;
	box-sizing: border-box;
	display: inline-block;
}

.shanchu{
	width: 100%;
    height: 22px;
	position: relative;
	float: left;
	margin-top: 20px;
}



.shanchu>div:nth-child(1){
	position: relative;
	float: left;
	width: 109px;
	height: 100%;
	line-height: 22px;
	font-size:14px;
    font-weight:bold;
    color:rgba(152,152,152,1);
}

.shanchu>div:nth-child(2){
	position: relative;
	float: right;
	width: 22px;
	height: 100%;
}
.shanchu>div:nth-child(2)>img{
  width: 22px;
	  height: 22px;
}

.xiaopin{
	position: relative;
	float: left;
	width: 100%;
	
}
.xiaopin>div{
	padding: 8px  15px;
	background:rgba(248,248,248,1);
border-radius:4px;
box-sizing: border-box;
display: inline-block;
color:rgba(51,51,51,1);
font-size:14px;
font-weight:bold;
position: relative;
float: left;
margin-top: 10px;
margin-left: 10px;
}

.activity{
	background: red;
}

.dan{
	width: 48%;
	margin-top: 15px;
	margin-left:2%;
	position: relative;
	float: left;
	box-sizing: border-box;
	background: #FFFFFF;
	border-radius:2px 2px 0px 0px;
}
.mui-bar-nav{
            box-shadow:none;
          border-bottom:1px  solid rgba(248,248,248,1);
		}

.dan img{
	width: 100%;
	height: 134px;
	position: relative;
	float: left;
}
.biaoti{
	position: relative;
	float: left;
	width: 100%;
	padding: 0  5px;
	line-height: 25px;
	box-sizing: border-box;
	text-align: left;
	height: 25px;
	font-size:13px;
    font-weight:500;
    color:rgba(51,51,51,1);
}  

.jinbi{
	position: relative;
	float: left;
	width: 100%;
	padding: 0  5px;
	line-height: 50px;
	height: 25px;
}
.jinbi>div:nth-child(1){
	position: relative;
	float:left ;
	width: 50%;
	height: 25px;
	line-height: 25px;
	font-size:12px;
font-weight:500;
color:rgba(255,90,90,1);
}
.jinbi>div:nth-child(2){
		position: relative;
		float:left ;
		width: 50%;
		height: 25px;
}
.jinbi>div:nth-child(2)>img{
	position: relative;
	float: right;
	width: 13px;
	height: 13px;
	margin-right: 3px;
	margin-top: 6px;
}
.jinbi>div:nth-child(2)>span{
	position: relative;
	float: right;
    line-height: 25px;
	font-size:12px;
font-weight:500;
color:rgba(153,153,153,1);
}

.fenye{
			width: 100%;
			height: 50px;
			position: relative;
			float: left;
			text-align: center;
			margin-top: 30px;
		}

</style>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<div class="xqsou">
				<input   placeholder="请输入你要搜索的视频名称" />
				<div id="sou">搜索</div>
				<img class="sous" src="../image/sou.png" />
			</div>
		</header>

		<div class="mui-content">
			<div class="shanchu">
				<div>搜索历史</div>
				<div id="shanchu"><img src="../image/delete.png" /></div>
			</div>

			<div class="xiaopin">
				<div>相生小品</div>
				<div>综艺节目</div>
				<div>相生小品</div>
				<div>综艺节目</div>
				<div>相生小品</div>
				<div>综艺节目</div>
			</div>
			
			<div   id="idss">
				<div id="shenti">
			
				</div>
				<div class="fenye">
					<div class="pages">
					</div>
				</div>
			
		</div>
		
		

	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/jquery-3.1.1.min.js"></script>
		<script src="../js/Page.js"></script>
		<script src="xqsousub1.js"></script>
	<script type="text/javascript">
		mui.init()
		mui.plusReady(function() {
			var url = plus.storage.getItem('url');
			var user = plus.storage.getItem('user');
			user = JSON.parse(user);
			var lishi = plus.storage.getItem('lishi');
			if(lishi){
				lishi  = JSON.parse(lishi);
			}else{
				lishi = [];
			}
			eachalltolishi(lishi);
			
			
			function sousuo(){
				var   sou=$(".xqsou  input").val();
				if(!sou){
					mui.toast('请输入你要搜索的视频名称');
					return;
				}
				// mui.alert(sou)
				mui.post(url+'/juyou/index/sousuovideo',{token:user.token,str:sou},function(res){
					if(res.code==200){
						eachallshipin(res.data.data);
						if(res.data.data.length==0){
							mui.toast('数据不存在');
							return
						}
						Page($(".pages"),{count:res.data.total,limit:6,head:true,upper:true},function(tiaojian){
							tiaojian.token = user.token;
							tiaojian.str = sou;
							mui.post(url+'/juyou/index/sousuovideo',tiaojian,function(ress){
								if(ress.code==200){
									eachallshipin(ress.data.data);
								}else{
									mui.toast(ress.msg);
								}
							})
						})
					}else{
						mui.toast(res.msg);
					}
				})
			}
			
			
			var height = document.body.clientHeight;
			$(".mui-content").css("height", height)
			document.getElementById("sou").addEventListener("tap", function() {
				var   sou=$(".xqsou  input").val();
                lishi = addlist(lishi,sou);
				eachalltolishi(lishi);
				plus.storage.setItem('lishi',JSON.stringify(lishi));
				$("#shenti").empty();
				sousuo();
			})
			//点击删除
			mui(document).on('tap','#shanchu',function(){
				plus.storage.setItem('lishi','');
				lishi = [];
				eachalltolishi(lishi);
			})
			/**
			 * 点击历史记录
			 */
			mui('.xiaopin').on('tap','div',function(){
				var str = $(this).text();
				$(".xqsou  input").val(str);
			})
			
		})
function xiangqing(id){
				mui.openWindow({
					url:'video.html',
					id:'video.html',
					extras: {
					videoid:id,
					},
				})
			}
	</script>
</html>
